package com.cyt.wx.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 学校通用用户模块-基础用户实体类
 *
 * @author han jun
 * @date 2019-8-29 13:41:23
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_wx_education_user")
public class WxEducationUser implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
	 * 微信应用
	 */
	@Column(name = "apply_id")
	private String applyId;

	/**
     * 会员ID
     */ 
	@Column(name = "member_id")
	private String memberId;

	/**
     * 登录名
     */ 
	@Column(name = "login_name")
	private String loginName;


	/**
	 * 用户的姓名
	 */
	@Column(name = "name")
	private String name;


	/**
     * 工号  也就是微信的登录名
     */ 
	@Column(name = "user_number")
	private String userNumber;

	/**
     * 人员角色:1、管理员,2、教师,3、学生
     */ 
	@Column(name = "user_type")
	private String userType;

	/**
     * 手机号码
     */ 
	@Column(name = "mobile")
	private String mobile;

	/**
     * 密码,默认设置为手机号后六位
     */ 
	@Column(name = "password")
	private String password;

	/**
	 * 是否有效1有效2无效
	 */
	@Column(name = "status")
	private String status;


	/**
	 * 一寸照片链接地址
	 */
	@Column(name = "issun_imge_url")
	private String issnumImageUrl;

	/**
	 * 审核状态
	 */
	@Column(name = "examine")
	private String examine;



	/**
	 * 图片的id
	 */
	@Column(name = "objectid_one")
	private String objectidOne;



	/**
     * 是否删除：1-未删除；2-已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author han jun
	 * @date 2019-8-29 13:41:23
	 */
	public WxEducationUser(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}